  # ifconfig eth0:10.0.2.10/24 up/down
  # ip addr add/del 10.0.2.10/24 dev eth0 label eth0:0

[ -f /etc/init.d/functions ] && . /etc/init.d/functions
RETVAL=0
op()
{
    if [ "$1" == "del" ]
    then
        list=`echo {16..1}`
    else
        list=`echo {1..16}`
    fi
    for ip in $list
    do
        if [ $ip -eq 10 ]
        then
            continue
        fi
        ip addr $1 10.0.2.$ip/24 dev eth0 label eth0:$ip &>/dev/null 2>&1
        RETVAL=$?
         if [ $RETVAL -eq 0 ];then
            action "add $ip" /bin/true
        else
            action "add $ip" /bin/false
        fi
    done
    return $RETVAL
}
case "$1" in
    start)
        op add
        RETVAL=$?
        ;;
    stop)
        op del
        RETVAL=$?
        ;;
    restart)
        op del
        sleep 2
        op add
        RETVAL=$?
        ;;
    *)
        printf "usage:$0 {start|stop|restart}\n"
esac
exit $RETVAL